﻿<!--
    Author   JO Hyeong-Ryeol
    Since	2013.06.11

    This file is a part of the Nicenis project.
    https://nicenis.codeplex.com
    
    Copyright (C) 2013 JO Hyeong-Ryeol. All rights reserved.   
-->
<Window x:Class="NicenisTestGui.DragResizerTestWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:n="clr-namespace:Nicenis.Windows;assembly=Nicenis"
        Title="DragResizerTestWindow" Height="532" Width="732"
        >
    <Grid Margin="24">
        <TextBlock
            Text="Resize this border to resize the window."
            FontSize="14"
            Margin="0 -21 0 0"
            HorizontalAlignment="Left"
            VerticalAlignment="Top"
            IsHitTestVisible="False"
            />

        <!-- The DragResizer that resizes this window. -->
        <n:DragResizer
            Target="{Binding RelativeSource={RelativeSource AncestorType=Window}}"
            BorderBrush="Red"
            BorderThickness="4"
            >
            <!-- The Canvas. -->
            <Canvas ClipToBounds="True">
                <TextBlock
                    Canvas.Left="180"
                    Canvas.Top="120"
                    Text="Resize this border."
                    FontSize="14"
                    Margin="0 -21 0 0"
                    HorizontalAlignment="Left"
                    VerticalAlignment="Top"
                    IsHitTestVisible="False"
                    />

                <!-- The DragResizer that resizes itself. -->
                <n:DragResizer
                    Canvas.Left="180"
                    Canvas.Top="120"
                    Width="300"
                    Height="200"
                    MinWidth="100"
                    MinHeight="100"
                    Target="{Binding RelativeSource={RelativeSource Self}}"
                    BorderBrush="Green"
                    BorderThickness="4"
                    />
            </Canvas>
        </n:DragResizer>
    </Grid>
</Window>
